package com.example.myretrofit2;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.myretrofit2.fragment.NavigationFragment;
import com.example.myretrofit2.httpMesholds.HttpMesholds;
import com.example.myretrofit2.presenter.MyPresenter;
import com.example.myretrofit2.presenter.MySubscriber;

import java.util.List;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class MainActivity extends AppCompatActivity {
    NavigationFragment navigationFragment;
    FragmentManager fm;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Intent intent = getIntent();
        String car = intent.getStringExtra("car");
        fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        navigationFragment = new NavigationFragment(car);
        ft.add(R.id.fram_mian,navigationFragment).commit();
    }

}